(module
  (import "env" "assert_eq_i32" (func $assert_eq_i32 (param i32 i32)))
  (start $main)
  (func $main (export "main")
    (call $assert_eq_i32 (call $max (i32.const 123) (i32.const 456)) (i32.const 456))
    (call $assert_eq_i32 (call $max (i32.const 789) (i32.const 456)) (i32.const 789))
  )
  (func $max (param $a i32) (param $b i32) (result i32)
    (if (result i32)
      (i32.gt_u (local.get $a) (local.get $b))
      (then (local.get $a) )
      (else (local.get $b) )
    )
  )
)